package com.sinosoft.perfect.common.system;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.dispatcher.SessionMap;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author gaoyan
 */
public class BaseAction extends ActionSupport implements SessionAware,
		ServletRequestAware, ServletResponseAware {

	private static final long serialVersionUID = 8414471269113504732L;
	
	protected ActionContext context = ActionContext.getContext(); 
	
	protected HttpServletRequest request;  
	
	protected HttpServletResponse response;  
	
	protected SessionMap<String,Object> session;
	
	public void setSession(Map<String, Object> session) {
		this.session = (SessionMap<String,Object>)session;
	}
	
	public void setServletRequest(HttpServletRequest request) {
		this.request=request;
	}
	
	public void setServletResponse(HttpServletResponse response) {
		this.response=response;
	}  

}
